﻿namespace Bimaru
{
    public enum CellOccupant
    {
        Empty = 0,
        Water = 1,
        Ship = 2,
        Max = 3
    }

    // Define an extension method in a non-nested static class.
    public static class Extensions
    {
        public static CellOccupant NextOccupant(this CellOccupant occupant)
        {
            return (CellOccupant)((((int)occupant) + 1) % ((int)CellOccupant.Max));
        }
    }

}